"""
Author: yida
Time is: 2022/5/9 11:12 
this Code: post请求, 登录cqnu校园网
"""
# 导入seleinum的webdriver接口
from selenium import webdriver
from selenium.webdriver.common.keys import Keys

# 创建浏览器对象
driver = webdriver.Chrome()
driver.get('http://10.0.251.18/a70.htm?wlanuserip=10.253.177.207&wlanacip=&wlanacname=&redirect=&session=&vlanid=0&ssid=&areaid=&ip=10.253.177.207&mac=000000000000')
# 输入用户名
driver.find_element_by_id('VipDefaultAccount').send_keys('2020110516028')
# 输入密码
driver.find_element_by_id("VipDefaultPassword").send_keys("yida123")
# 点击回车
driver.find_element_by_id('VipDefaultPassword').send_keys(Keys.ENTER)
